<template>
  <div class="company-style">
    <!-- 导航栏 start -->
    <van-nav-bar title="设置" left-arrow fixed @click-left="$router.back()" />
    <!-- 导航栏 end -->

    <!-- 栏目 start -->
    <div class="content-top">
      <van-cell-group>
        <van-cell title="绑定手机" :value="bindPhone" is-link size="large" @click="$router.push({name:'company-my-settingbind'})" />
        <van-cell title="修改密码" is-link size="large" @click="$router.push({name:'company-my-settingpassword'})" />
      </van-cell-group>
      <van-cell-group style="margin-top: 10px" @click="$router.push({name:'person-my-setting-about'})">
        <van-cell title="关于我们" is-link size="large" />
      </van-cell-group>
      <div style="margin-top: 10px">
        <van-button block plain size="large" type="primary" text="注销账号" style="border-color: #fff; font-size: 17px; color: #f00" @click="logout"></van-button>
      </div>
    </div>
    <!-- 栏目 end -->
  </div>
</template>

<script>
import { NavBar, Cell, CellGroup, Button, Dialog } from "vant";
import Global from '@/Global';
import { clearAll } from '@/util/session';
import MyMixin from '@/mixin/MyMixin';
export default {
  name: "LivePlay",
  components: {
    [NavBar.name]: NavBar,
    [Cell.name]: Cell,
    [CellGroup.name]: CellGroup,
    [Button.name]: Button,
  },
  // 定义属性
  data() {
    return {
      bindPhone: ''
    };
  },
	mixins:[MyMixin],
  mounted() {
    this.loadData();
    this.$bus.$on(Global.bus_company_bindphone_update, () => {
      this.loadData();
    })
  },
  // 方法集合
  methods: {
    loadData() {
      this.$api.get('/CompanyAccount/GetMobileNum').then(res => {
        this.bindPhone = res.response;
      })
    },
    logout() {
			this.userLogout('C');
    }
  },
};
</script>

<style lang="less">
@import "vant/lib/index.less";
@import "@/assets/css/company.less";
@import "@/assets/css/company.css";
</style>